import java.io.IOException;


public class Driver {
	public static final int DISK_SIZE = 2048;
	public static final int RAM_SIZE = 1024;
	public static int NUMBER_OF_CPUs;
	public static  String FILE_NAME;
	public static  LTS.method METHOD;
	public static  boolean PAGING;
	public static void main(String[] args){
		new GUI().setVisible(true);
	}
	
	public static void runOS(String cpuNum, String scheSel, String file, Boolean pageSet) throws NumberFormatException, IOException{
	
		NUMBER_OF_CPUs = Integer.parseInt(cpuNum);
		setSchedule(scheSel);
		FILE_NAME = "./" + file;
		PAGING = pageSet;
		
		System.out.println("\nSystem is set to run on " + cpuNum + "CPU, " + scheSel + ", from " + file + ", paging = " + pageSet);
		
		Loader.Load();
		MemoryManager.Initialize();
		LTS.schedule();
		BookKeeper.results = new String[Jobs.allJobs.size()];		
		STS.Initialize();
		while(STS.Working()){
			//Do Nothing			
		}
		BookKeeper.reportResults();
		//MemoryManager.dump();
		
		//System.out.print(cpuNum + "    " + scheSel +"    " + file +"    " + pageSet.toString());
	}
	
	private static void setSchedule (String s){
		if (s == "FCFS"){
			METHOD = LTS.method.FCFS;
		}
		else if(s == "PRIORITY"){
			METHOD = LTS.method.PRIORITY;
		}
		else if (s == "SJF"){
			METHOD = LTS.method.SJF;
		}

	}

}
